package com.alfa.myworld.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;

public class UserLoggedLabel extends Composite {

	private static UserLoggedLabelUiBinder uiBinder = GWT
			.create(UserLoggedLabelUiBinder.class);

	interface UserLoggedLabelUiBinder extends UiBinder<Widget, UserLoggedLabel> {
	}

	@UiField Label userAccount;
	@UiField HTML contenido; 
	
	public UserLoggedLabel(){
		initWidget(uiBinder.createAndBindUi(this));
		contenido.setText("mockUser@gmail.com");
	}
	
	public UserLoggedLabel(String userAccount) {
		initWidget(uiBinder.createAndBindUi(this));
		if(userAccount.length() == 0){
			userAccount = "mockUser@gmail.com";	
		}
		contenido.setText(userAccount);
	}
	
}
